﻿// Gateway.Api 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using System.Text.Json.Serialization;

namespace Aurora.AI.Wiki.Models.Images;
/// <summary>
/// 图片创建参数
/// </summary>
public class ImageCreateRequest
{
    /// <summary>
    ///     The number of images to generate. Must be between 1 and 10.
    ///     For dall-e-3 model, only n=1 is supported.
    /// </summary>
    [JsonPropertyName("n")]
    public int? N { get; set; }

    /// <summary>
    ///     The size of the generated images. 
    ///     Must be one of 256x256, 512x512, or 1024x1024 for dall-e-2. 
    ///     Must be one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3 models.
    ///     <br /><br />Check <see cref="StaticValues.ImageStatics.Size"/> for possible values
    /// </summary>
    [JsonPropertyName("size")]
    public string Size { get; set; }

    /// <summary>
    ///     The format in which the generated images are returned. Must be one of url or b64_json
    /// </summary>
    [JsonPropertyName("response_format")]
    public string ResponseFormat { get; set; }

    /// <summary>
    ///     A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
    ///     <a href="https://platform.openai.com/docs/usage-policies/end-user-ids">Learn more</a>.
    /// </summary>
    [JsonPropertyName("user")]
    public string User { get; set; }

    /// <summary>
    ///     The model to use for image generation. Must be one of dall-e-2 or dall-e-3
    ///     For ImageEditCreateRequest and for ImageVariationCreateRequest only dall-e-2 modell is supported at this time.
    /// </summary>
    [JsonPropertyName("model")]
    public string Model { get; set; }


    /// <summary>
    ///     A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3
    /// </summary>
    [JsonPropertyName("prompt")]
    public string Prompt { get; set; }

    /// <summary>
    ///     The quality of the image that will be generated. Possible values are 'standard' or 'hd' (default is 'standard').
    ///     Hd creates images with finer details and greater consistency across the image. 
    ///     This param is only supported for dall-e-3 model.
    ///     <br /><br />Check <see cref="StaticValues.ImageStatics.Quality"/> for possible values
    /// </summary>
    [JsonPropertyName("quality")]
    public string Quality { get; set; }

    /// <summary>
    ///     The style of the generated images. Must be one of vivid or natural. 
    ///     Vivid causes the model to lean towards generating hyper-real and dramatic images. 
    ///     Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for dall-e-3. 
    ///     <br /><br />Check <see cref="StaticValues.ImageStatics.Style"/> for possible values
    /// </summary>
    [JsonPropertyName("style")]
    public string Style { get; set; }
}
